import { ProColumns } from '@ant-design/pro-table'
const statusEnum = {
    0: { color: 'red', text: '停用' },
    1: { color: 'green', text: '正常' },
}
const companyType = {
    1: { color: 'red', text: '企业' },
    2: { color: 'volcano', text: '分销商' },
    3: { color: 'green', text: '个人' },
}
export const columns: ProColumns<IT.ICompany>[] = [
    { title: '#', dataIndex: 'index', valueType: 'index', width: 30 },
    { title: '编号', dataIndex: 'companyid', hideInSearch: true, width: 50 },
    { title: '经销商名称', dataIndex: 'companyName', width: 100, ellipsis: true },
    { title: '总数', dataIndex: 'total', hideInSearch: true, width: 45 },
    { title: '在途', dataIndex: 'roadCount', hideInSearch: true, width: 45 },
    { title: '在库', dataIndex: 'stockCount', hideInSearch: true, width: 45 },
    { title: '销售', dataIndex: 'saleCount', hideInSearch: true, width: 45 },
    { title: '激活', dataIndex: 'lineCount', hideInSearch: true, width: 45 },
    { title: '残次', dataIndex: 'defectCount', hideInSearch: true, width: 45 },
    {
        title: '状态',
        dataIndex: 'companyStatus',
        valueType: 'select',
        valueEnum: statusEnum,
        width: 60,
    },
    {
        title: '类型',
        dataIndex: 'companyType',
        valueType: 'select',
        valueEnum: companyType,
        width: 60,
    },
    { title: '联系电话', dataIndex: 'companyPhone', width: 80, ellipsis: true },
    { title: '联系地址', dataIndex: 'companyAddress', width: 80, ellipsis: true },
    { title: '创建人', dataIndex: 'au', hideInSearch: true, width: 60, ellipsis: true },
    { title: '创建时间', dataIndex: 'ct', hideInSearch: true, width: 60, ellipsis: true },
    { title: '更新人', dataIndex: 'ed', hideInSearch: true, width: 60, ellipsis: true },
    { title: '更新时间', dataIndex: 'ut', hideInSearch: true, width: 60, ellipsis: true },
]
